#ifndef _NBIOT_H_
#define _NBIOT_H_



typedef enum{
    QOS_LEVEL_0 = 0,
    QOS_LEVEL_1,
    QOS_LEVEL_2,
}qos_level_t;


typedef struct bc28_net_ctx{
	
	int (*iNetworkAttach_auto)(void);
	
	int (*iNetworkAttach_manual)(void);

	int (*iNetworkCheck)(void);

	int (*iDomainNameResolve)(char *, char *);

}BC28_NET_CTX;

typedef struct bc28_tcp_ctx{

	BC28_NET_CTX net_ctx;
	
	int (*tcp_create)(int);

	int (*tcp_wait)(int *, int);

	int (*tcp_conn)(int, char *, int);
	
	int (*tcp_send)(int, unsigned char *, int, int);

	int (*tcp_recv)(int, int *, unsigned char *, int, int);

	int (*tcp_close)(int);

}BC28_TCP_CTX;



int nbiot_net_ctx_init(BC28_NET_CTX *ctx);
int nbiot_tcp_ctx_init(BC28_TCP_CTX *ctx);

#endif

